#include "vision.h"
#include "control.h"

#include <Ogre.h>
using namespace std;
using namespace Ogre;

int cv_main(HANDLE lock, Controler* c)
{
	Real lenL = 0.f, lenR = 0.f, heiL = 0.f, heiR = 0.f;
	
	CvCapture* cap = c->get_capture();
	
	IplImage* bg, cur, f;

	
	for(;;)
	{
		// todo

		
		
		cvWaitKey(10);

		WaitForSingleObject(lock, INFINITE);
		c->set_value(lenL, lenR, heiL, heiR);
		ReleaseMutex(lock);
	}
}
